package org.wm.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.wm.domain.SysOperLog;
import org.wm.mapper.SysOperLogMapper;
import org.wm.service.ISysOperLogService;

/**
 * 操作日志 服务层处理
 * (已按照 Mybatis-Plus 混合模式进行改造)
 */
@RequiredArgsConstructor
@Service
public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOperLog> implements ISysOperLogService {

    @Override
    public void insertOperlog(SysOperLog operLog) {
        this.save(operLog);
    }

    @Override
    public IPage<SysOperLog> selectOperLogPage(Page<SysOperLog> page, SysOperLog operLog) {
        return baseMapper.selectOperLogList(page, operLog);
    }

    @Override
    public SysOperLog selectOperLogById(Long operId) {
        return this.getById(operId);
    }

    @Override
    public void cleanOperLog() {
        baseMapper.cleanOperLog();
    }
}